#include<stdio.h>
#include<stdlib.h>

struct clerk
{
	char name[20];
	int number;
	struct clerk* pnext;
	
 } ;
 int count;
 struct clerk* create()
{
	struct clerk* phead=NULL;
	struct clerk* pend,*pnew;
	count=0;
	pend=pnew=(struct clerk*)malloc(sizeof(struct clerk));
	printf("please first enter name ,then number\n");
	scanf("%s",&pnew->name);
	scanf("%d",&pnew->number);
	while(pnew->number!=0)
	{
		count++;
		if(count==1)
	{
		pnew->pnext=phead;
		pend=pnew;
		phead=pnew;
	}
	else
	{
		pnew->pnext=NULL;
		pend->pnext=pnew;
		pend=pnew;
	}
	pnew=(struct clerk*)malloc(sizeof(struct clerk));
	scanf("%s",&pnew->name);
	scanf("%d",&pnew->number);
	
	}
	free(pnew);
	return phead;
}

void print(struct clerk* phead)
{
	struct clerk *ptemp;
	int index=1;
	printf("-------the list has %d members:-------\n",count);
	printf("\n");
	ptemp=phead->pnext;
	index++;
	
}

int main()
{
	struct clerk* phead;
	phead=create();
	print(phead);
	return 0;
}
